﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Web.Mvc;

namespace UnfriendlyFire.Models
{
    public class NewUser
    {
        public NewUser()
        {
            var questions = new[] { 
                "Mother's Maiden Name", 
                "Father's Middle Name",
                "First Pet Name",
                "Favorite Color"
            };
            PossiblePasswordQuestions = new SelectList(questions, questions[0]);
        }

        [Required]
        [DataType(System.ComponentModel.DataAnnotations.DataType.EmailAddress)]
        [StringLength(32)]
        public string Email { get; set; }

        [Required]
        [DataType(System.ComponentModel.DataAnnotations.DataType.Password)]
        [StringLength(16)]
        public string Password { get; set; }

        [DisplayName("Stay signed in")]
        public bool StaySignedIn { get; set; }

        [Required]
        [DisplayName("Password Recovery Question")]
        public string PasswordQuestion { get; set; }

        [Required]
        [StringLength(16)]
        [DisplayName("Password Recovery Answer")]
        public string PasswordAnswer { get; set; }

        public SelectList PossiblePasswordQuestions { get; private set; }
    }
}